<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="http://www.cnboy.top/Forfun/Bootstrap/css/bootstrap.min.css">
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/jquery.min.js"></script>
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/popper.min.js"></script>
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/bootstrap.min.js"></script>
    <title>文章编辑</title>
</head>
<body>
<div class="jumbotron text-center" style="margin-bottom: 0">
    <h1>文章编辑</h1>
</div>
<div class="container text-center">
    <form action="" method="POST">
        <h1 class="text-center">文章标题</h1><input type="text" name="title" id="title" value="<?php  echo $art['title']; ?>">
        <h4>栏目</h4>
        <select name="cat_id" id="cat_id">
            <?php foreach($cats as $c){ ?>
<!--            报错但是没错 懂吗？-->
            <option value ="<?php echo $c['cat_id']; ?>" <?php if($c['cat_id'] == $art['cat_id']) { ?>  selected="selected"     <?php }?>  > <?php echo $c['cat_name'];?></option>
            <?php } ?>
        </select>
        <h3>文章标签</h3><input type="text" id="tag" name="tag" value="<?php echo $art['arttag']; ?>">
        <h4 class="text-center">文章作者</h4><input type="text" id="author" name="author" placeholder="请输入作者">
        <h4>文章内容</h4><textarea name="content" id="content" style="width:100%;height:600px;" ><?php echo $art['content']; ?></textarea>
        <input type="submit" value="提交">
    </form>
</div>
<div class="jumbotron text-center" style="margin-bottom:0">
    <h5>Copyright © 2020-2021 罗阿杜cnboy.top All Rights Reserved. </h5>
</div>
</body>
</html>